package com.jasonchoi.redisqueue;


import com.jasonchoi.redisqueue.queue.IRedisQueueConsumer;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * 测试消费者
 */
@Log4j2
@Component
public class TestRedisConsumer implements IRedisQueueConsumer<String> {

    public static final String TEST_TOPIC = "TEST_TOPIC";

    @Override
    public void handle(String v) {
        //这里调用你延迟之后的代码
        int i = 1 / 0;
        log.info("执行...." + v);
    }

    @Override
    public String getTopic() {
        return TEST_TOPIC;
    }
}